Optimal. Leaf size=229 \[ \frac{(a+b) \log \left (\sqrt{e} \cot (c+d x)-\sqrt{2} \sqrt{e \cot (c+d x)}+\sqrt{e}\right )}{2 \sqrt{2} d e^{3/2}}-\frac{(a+b) \log \left (\sqrt{e} \cot (c+d x)+\sqrt{2} \sqrt{e \cot (c+d x)}+\sqrt{e}\right )}{2 \sqrt{2} d e^{3/2}}-\frac{(a-b) \tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} d e^{3/2}}+\frac{(a-b) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}+1\right )}{\sqrt{2} d e^{3/2}}+\frac{2 a}{d e \sqrt{e \cot (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19379, antiderivative size = 229, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 8, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.348, Rules used = {3529, 3534, 1168, 1162, 617, 204, 1165, 628} \[ \frac{(a+b) \log \left (\sqrt{e} \cot (c+d x)-\sqrt{2} \sqrt{e \cot (c+d x)}+\sqrt{e}\right )}{2 \sqrt{2} d e^{3/2}}-\frac{(a+b) \log \left (\sqrt{e} \cot (c+d x)+\sqrt{2} \sqrt{e \cot (c+d x)}+\sqrt{e}\right )}{2 \sqrt{2} d e^{3/2}}-\frac{(a-b) \tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} d e^{3/2}}+\frac{(a-b) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}+1\right )}{\sqrt{2} d e^{3/2}}+\frac{2 a}{d e \sqrt{e \cot (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3529
Rule 3534
Rule 1168
Rule 1162
Rule 617
Rule 204
Rule 1165
Rule 628
Rubi steps
\begin{align*} \int \frac{a+b \cot (c+d x)}{(e \cot (c+d x))^{3/2}} \, dx &=\frac{2 a}{d e \sqrt{e \cot (c+d x)}}+\frac{\int \frac{b e-a e \cot (c+d x)}{\sqrt{e \cot (c+d x)}} \, dx}{e^2}\\ &=\frac{2 a}{d e \sqrt{e \cot (c+d x)}}+\frac{2 \operatorname{Subst}\left (\int \frac{-b e^2+a e x^2}{e^2+x^4} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{d e^2}\\ &=\frac{2 a}{d e \sqrt{e \cot (c+d x)}}+\frac{(a-b) \operatorname{Subst}\left (\int \frac{e+x^2}{e^2+x^4} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{d e}-\frac{(a+b) \operatorname{Subst}\left (\int \frac{e-x^2}{e^2+x^4} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{d e}\\ &=\frac{2 a}{d e \sqrt{e \cot (c+d x)}}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{\sqrt{2} \sqrt{e}+2 x}{-e-\sqrt{2} \sqrt{e} x-x^2} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} d e^{3/2}}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{\sqrt{2} \sqrt{e}-2 x}{-e+\sqrt{2} \sqrt{e} x-x^2} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} d e^{3/2}}+\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{e-\sqrt{2} \sqrt{e} x+x^2} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{2 d e}+\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{e+\sqrt{2} \sqrt{e} x+x^2} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{2 d e}\\ &=\frac{2 a}{d e \sqrt{e \cot (c+d x)}}+\frac{(a+b) \log \left (\sqrt{e}+\sqrt{e} \cot (c+d x)-\sqrt{2} \sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} d e^{3/2}}-\frac{(a+b) \log \left (\sqrt{e}+\sqrt{e} \cot (c+d x)+\sqrt{2} \sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} d e^{3/2}}+\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} d e^{3/2}}-\frac{(a-b) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} d e^{3/2}}\\ &=-\frac{(a-b) \tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} d e^{3/2}}+\frac{(a-b) \tan ^{-1}\left (1+\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} d e^{3/2}}+\frac{2 a}{d e \sqrt{e \cot (c+d x)}}+\frac{(a+b) \log \left (\sqrt{e}+\sqrt{e} \cot (c+d x)-\sqrt{2} \sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} d e^{3/2}}-\frac{(a+b) \log \left (\sqrt{e}+\sqrt{e} \cot (c+d x)+\sqrt{2} \sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} d e^{3/2}}\\ \end{align*}
Mathematica [C] time = 0.349442, size = 196, normalized size = 0.86 \[ \frac{8 b \tan ^{\frac{3}{2}}(c+d x) \text{Hypergeometric2F1}\left (\frac{3}{4},1,\frac{7}{4},-\tan ^2(c+d x)\right )+3 a \left (2 \left (\sqrt{2} \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )-\sqrt{2} \tan ^{-1}\left (\sqrt{2} \sqrt{\tan (c+d x)}+1\right )\right )+8 \sqrt{\tan (c+d x)}+\sqrt{2} \log \left (\tan (c+d x)-\sqrt{2} \sqrt{\tan (c+d x)}+1\right )-\sqrt{2} \log \left (\tan (c+d x)+\sqrt{2} \sqrt{\tan (c+d x)}+1\right )\right )}{12 d \tan ^{\frac{3}{2}}(c+d x) (e \cot (c+d x))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.02, size = 355, normalized size = 1.6 \begin{align*} -{\frac{b\sqrt{2}}{4\,d{e}^{2}}\sqrt [4]{{e}^{2}}\ln \left ({ \left ( e\cot \left ( dx+c \right ) +\sqrt [4]{{e}^{2}}\sqrt{e\cot \left ( dx+c \right ) }\sqrt{2}+\sqrt{{e}^{2}} \right ) \left ( e\cot \left ( dx+c \right ) -\sqrt [4]{{e}^{2}}\sqrt{e\cot \left ( dx+c \right ) }\sqrt{2}+\sqrt{{e}^{2}} \right ) ^{-1}} \right ) }-{\frac{b\sqrt{2}}{2\,d{e}^{2}}\sqrt [4]{{e}^{2}}\arctan \left ({\sqrt{2}\sqrt{e\cot \left ( dx+c \right ) }{\frac{1}{\sqrt [4]{{e}^{2}}}}}+1 \right ) }+{\frac{b\sqrt{2}}{2\,d{e}^{2}}\sqrt [4]{{e}^{2}}\arctan \left ( -{\sqrt{2}\sqrt{e\cot \left ( dx+c \right ) }{\frac{1}{\sqrt [4]{{e}^{2}}}}}+1 \right ) }+{\frac{a\sqrt{2}}{4\,de}\ln \left ({ \left ( e\cot \left ( dx+c \right ) -\sqrt [4]{{e}^{2}}\sqrt{e\cot \left ( dx+c \right ) }\sqrt{2}+\sqrt{{e}^{2}} \right ) \left ( e\cot \left ( dx+c \right ) +\sqrt [4]{{e}^{2}}\sqrt{e\cot \left ( dx+c \right ) }\sqrt{2}+\sqrt{{e}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt [4]{{e}^{2}}}}}+{\frac{a\sqrt{2}}{2\,de}\arctan \left ({\sqrt{2}\sqrt{e\cot \left ( dx+c \right ) }{\frac{1}{\sqrt [4]{{e}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{e}^{2}}}}}-{\frac{a\sqrt{2}}{2\,de}\arctan \left ( -{\sqrt{2}\sqrt{e\cot \left ( dx+c \right ) }{\frac{1}{\sqrt [4]{{e}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{e}^{2}}}}}+2\,{\frac{a}{de\sqrt{e\cot \left ( dx+c \right ) }}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b \cot{\left (c + d x \right )}}{\left (e \cot{\left (c + d x \right )}\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \cot \left (d x + c\right ) + a}{\left (e \cot \left (d x + c\right )\right )^{\frac{3}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]